<!Doctype html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <script th:src="@{/jquery-1.11.3.min.js}"></script>
    <link th:href="@{/bootstrap-4.5.0-dist/css/bootstrap.css}" rel="stylesheet">
    <script th:src="@{/jquery/jqPaginator.js}"></script>
</head>

<body>
<div class="container">
    <h3 class="text-center">工资列表</h3><br>
<!--    <div style="margin-top: 25px;margin-bottom: 20px">-->
<!--        <input type="text" class="am-form-field" style="margin-bottom: 20px;width: 250px;height: 40px" placeholder="请输入地点查询" id="houseadress">-->
<!--        <span class="am-input-group-btn">-->
<!--                            <button class="btn btn-success" onclick="showHouse()"><span>搜索</span></button>-->
<!--                            <button class="btn btn-danger" ><a>返回</a></button>-->
<!--                </span>-->
<!--    </div>-->


    <!--        <div class="am-input-group am-input-group-sm" style="float: right;margin-top: 20px">-->
    <!--            -->
    <!--        </div>-->



    <table class="table">
        <tr><th>年</th><th>月</th><th>员工编号</th><th>工资</th>

        <tr th:each="one:${salary}">
            <td th:text="${one.year}"></td>
            <td th:text="${one.month}"></td>
            <td th:text="${one.user_id}"></td>
            <td th:text="${one.sal}"></td>
<!--            <td> <a class="btn btn-primary" th:href="@{/restful/salaryList}" >确认</a>-->
            </td>
        </tr>
    </table>


    <!-- <script th:inline="javascript">
         function del(id) {
             if(confirm("确定要删除?")){

                 $.ajax({
                     url:[[@{/restful/user/}]] +id, method:"POST",
                     data:{
                         _method:"delete"
                 },
                 success:function(data) {
                     if(data=="ok"){
                         location.reload();}
                     else {
                         alert("删除失败");}
                 }
               });
             }
         }
     </script>-->

<!--    <script>-->
<!--        function showHouse() {-->
<!--            var houseadress = $("#houseadress").val();-->
<!--            $.ajax({-->
<!--                url:"/restful/housefind",-->
<!--                data:{"houseaddress":houseaddress},-->
<!--                success:function(data){-->

<!--                },-->
<!--            });-->
<!--        }-->


<!--    </script>-->
</body>
</html>